swap case hackerrank solution in python